package EntityPack;

import MaterialPack.Oxygen;
import EntityPack.Entity;
import EntityPack.Lander;
import EntityPack.Player;
import EntityPack.StorageTank;
import MapPack.Map;

import java.util.ArrayList;

/**
 * Created by Aaron on 8/9/2014.
 */

public class EntityGenerator {
    Map map;
    Player player;

    public EntityGenerator (Map map) {
        this.map = map;
    }

    public void generateEntities ( ) {

        // Generate the player.
        this.player = new Player(this.map, this.map.getSpawn());

        StorageTank playerTank = new StorageTank(1000,
                1,
                Oxygen.class,
                0f);
        this.player.addPortable(playerTank);

        // Generate lander.
        new Lander(this.map,
                this.map.getMapCell(this.map.getSpawn().getX() + 1, this.map.getSpawn().getY() + 1));
        new StorageTank(this.map,
                this.map.getMapCell(this.map.getSpawn().getX() + 8, this.map.getSpawn().getY()),
                1000,
                1,
                Oxygen.class,
                1000f);
    }

    public Player getPlayer ( ) {
        return this.player;
    }
}
